/**
 * @(#)LoginTypeEnum.java 2016年11月5日
 * Copyright(C) 2016 ZHEXIN IT CO.,LTD. All rights reserved.
 */
package org.jsbd.boss.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * 短信发送登录方式
 * <p>
 * 1 一级权限 2  二级权限 3 3级权限 数字越小权限越大
 *
 * @author <a href="mailto:xupengcheng@zhexinit.com" >徐鹏程</a>
 * @version 1.0.0
 */
public enum LoginTypeEnum {


    SDK(1, "SDK", 2),
    PROXY(2, "代理", 3),
    MIGU(3, "历史移动咪咕", 3),
    SMS_CODE(4, "短信验证码", 1),
    WEIBO(5, "微博", 3),
    //    WEIXIN(6, "微信",3),
//    DIANJOY(7, "点乐", 3),
//	KASHANG(8, "卡商", 3),
//	HONGBAO(9, "红包广告", 3),
    OFFLINE(10, "历史用户", 3),
    SELF_CARD(11, "自有卡", 3),
    NO_NEEED_LOGIN(99, "不登录", 3),
    THIRD_MIGU(12, "第三方咪咕", 3),
    SELF_MOBILE_MIGU(13, "自有移动咪咕", 3),
    //	SIX_MONTH_MIGU(14, "六个月内咪咕"),
    SELF_UNICOM_MIGU(15, "自有联通咪咕", 3),
    SELF_TELECOM_MIGU(16, "自有电信咪咕", 3),
    TEMP_MIGU(17, "临时咪咕", 3),
    THIRD_MIGU2(18, "2-第三方咪咕", 3),
    SELF_MAO(19, "自有猫", 3),
    MIGU_VEDIO(20, "广州-咪咕视频", 3),
    MIGU_VEDIO2(21, "深圳-咪咕视频", 3),
    MAO_MOBILE(22, "历史移动猫", 3),
    BASIC(23, "基础信息-没有APP信息", 3),
    HISTORY_NEW_LOGIN(24, "新历史用户", 3),
    QQ_LOGIN(25, "QQ登录", 3),
    QQ_ACCEPT_LOGIN(26, "QQ授权登录", 3);

    private int type;
    private String name;
    private int priorty;

    private LoginTypeEnum(int type, String name, int priorty) {
        this.type = type;
        this.name = name;
        this.priorty = priorty;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public int getPriorty() {
        return priorty;
    }

    public void setPriorty(int priorty) {
        this.priorty = priorty;
    }

    private static Map<Integer, LoginTypeEnum> map = new HashMap<Integer, LoginTypeEnum>();

    static {
        for (LoginTypeEnum loginTypeEnum : LoginTypeEnum.values()) {
            map.put(loginTypeEnum.type, loginTypeEnum);
        }
    }

    public static LoginTypeEnum valueOf(int type) {
        return map.get(type);
    }

    public static Map<Integer, LoginTypeEnum> getMap() {
        return map;
    }

}
